<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,body{
            margin: 0;
            padding: 0;
        }
        .img-container{
            /* 解决方案一 */
            /* font-size: 0; */
            background-color: lightblue;
            /* 解决方案四 */
            /* line-height: 0; */

        }
        /* inline-block 有回车符 有间隙 */
        img{
            /* 默认行内元素 */
            /* height 自适应  */
            /* 底部有间隙 */
            /* width: 100%; */
            /* 解决方案二 */
            /* display: block; */
            /* 解决三 */
            vertical-align: bottom;
        }
    </style>
</head>
<body>
    <div class="img-container">
        <span>aaaaa</span><img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F202002%2F05%2F20200205093101_yfocq.png&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1636215521&t=203563292576c66ba434651680281e8a" alt="">
    </div>
</body>
</html>